package cn.com.bod.fas.common.configuration;

import cn.com.bod.fas.common.interceptor.OpBackupInterceptor;
import cn.com.bod.fas.common.interceptor.OpHistoryCacheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import tk.mybatis.mapper.autoconfigure.ConfigurationCustomizer;

//@Configuration
public class MyBatisExtendInterceptorConfiguration {

    @Autowired
    private OpHistoryCacheService opHistoryCacheService;

    @Bean
    ConfigurationCustomizer mybatisConfigurationCustomizer() {
        return configuration -> configuration.addInterceptor(new OpBackupInterceptor(opHistoryCacheService));
    }

}
